package cloud.lysky.java.on.design_pattern.chain_of_responsibility;

/**
 * @author luoly
 * @describe
 * @date 2022-08-20 11:43
 **/
public class App {
    public static void main(String[] args) {
        HeaderTextProcessing headerTextProcessing = new HeaderTextProcessing();
        SpellCheckerProcessing spellCheckerProcessing = new SpellCheckerProcessing();

        //将两个对象链接起来
        headerTextProcessing.setSuccessor(spellCheckerProcessing);
        String result = headerTextProcessing.handle("James is a ugly man!");
        System.out.println(result);
    }
}